// 修复 URL 报错问题
const root =
    globalThis.window === globalThis ? window.location.href : undefined;
export const createURL = (url: string | URL) => {
    if (typeof url === "string") {
        return new URL(url, root);
    } else {
        return url;
    }
};
